//
//  MyMusicTableViewCell.m
//  NewMusic
//
//  Created by dllo on 15/11/12.
//  Copyright © 2015年 Going. All rights reserved.
//

#import "MyMusicTableViewCell.h"

@interface MyMusicTableViewCell ()
@property (nonatomic, retain) UIImageView *imageV;
@property (nonatomic, retain) UILabel *label;
@end

@implementation MyMusicTableViewCell

- (void)dealloc
{
    [_imageV release];
    [_label release];
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        [self creatSubView];
    }
    return self;
}
- (void)creatSubView
{
    UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 2, 375, 53)];
    view.backgroundColor = [UIColor whiteColor];
    view.alpha = 0.05;
    [self.contentView addSubview:view];
    [view release];
    
    self.imageV = [[UIImageView alloc] initWithFrame:CGRectMake(10, 6, 45, 45)];
    self.imageV.image = [UIImage imageNamed:@"MyMusic"];
    [self.contentView addSubview:self.imageV];
    [_imageV release];
    
    self.label = [[UILabel alloc] initWithFrame:CGRectMake(60, 10, 100, 35)];
    self.label.text = @"新建歌单";
    self.label.textColor = [UIColor whiteColor];
    self.label.font = [UIFont systemFontOfSize:15.0];
    [self.contentView addSubview:self.label];
    [_label release];
    
    UIImageView *imageViewRight = [[UIImageView alloc] initWithFrame:CGRectMake(345, 12.5, 20, 30)];
    imageViewRight.image = [UIImage imageNamed:@"icon-you"];
    [self.contentView addSubview:imageViewRight];
    [imageViewRight release];
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    if (self.str.length != 0)
    {
        self.label.text = self.str;
    }
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
